package com.vhall.component.controller.interactive.facade;


import com.vhall.component.entity.interactive.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;


/**
 * @author: xin.qin
 * @date: 2022/06/27 19:55
 */
@FeignClient(value = "DocumentConsoleFacade", path = "/v4/document/upload")
public interface DocumentUploadFacade {
    /**
     * 文件上传前的注册
     *
     * @param reqVO
     * @return
     */
    @PostMapping("/register")
    UploadRegisterRespVO register(@Validated UploadRegisterReqVO reqVO);

    /**
     * 分块检查
     *
     * @param reqVO
     * @return
     */
    @PostMapping("/checkchunk")
    UploadCheckChunkRespVO checkChunk(@Validated UploadCheckChunkReqVO reqVO);

    /**
     * 上传分块
     *
     * @param reqVO
     * @return
     */
    @GetMapping("/uploadchunk")
    UploadChunkRespVO uploadChunk(@Validated UploadChunkReqVO reqVO);


    /**
     * 合并文件
     *
     * @param reqVO
     * @return
     */
    @PostMapping("/mergechunks")
    UploadMergeChunkRespVO mergeChunks(@Validated UploadMergeChunkReqVO reqVO);
}
